import { Component, Input, Inject, ViewChild } from '@angular/core';
import { PREVIEWPOS, DIMENSION, Dimension, Coord } from '../models/dimension';
import { TetriminoCmp } from './tetrimino.cmp';
import { Shape } from '../models/shape';


@Component({
  moduleId: module.id,
  selector: 'th-tetris-preview',
  templateUrl: 'preview.cmp.html',
  styleUrls: ['preview.cmp.css'],
  directives: [TetriminoCmp],
  providers: [{ provide: DIMENSION, useValue: [4, 4] }]
})
export class PreivewCmp {
  @Input() label: string;
  @Input() shape: Shape;
  get x() { return this.shape ? "OI".indexOf(this.shape) >= 0 ? 2 : 1.5 : null }
  get y() { return 2; }
}